package com.design.pattern.adapter;

public class AdapterTest {
    public static void main(String[] args) {
        MallardDuck mallardDuck = new MallardDuck();
        WildTurkey wildTurkey = new WildTurkey();
        TurkeyAdapter turkeyAdapter = new TurkeyAdapter(wildTurkey);

        System.out.println("-------------test wildTurker");
        wildTurkey.gobble();
        wildTurkey.fly();

        System.out.println("-------------test mallardDuck");
        testDuck(mallardDuck);

        System.out.println("-------------test turkeyAdapter");
        testDuck(turkeyAdapter);

    }

    static void testDuck(Duck duck){
        duck.quack();
        duck.fly();
    }

}